package com.juzipi.data.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.juzipi.data.model.TeacherAge;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/7/2 8:26
 * @Info
 */
public interface TeacherAgeMapper extends BaseMapper<TeacherAge> {

    @Insert("insert into teacher_age(id) select id from teacher")
    void savesave();

    @Delete("delete from teacher_age order by id limit 50000")
    void deleteAll();

    void updateAll(List<Long> longs, ArrayList<Integer> integers);

    @Select("select id from teacher_age limit #{limit} offset #{offset}")
    List<Long> selectLimt(int limit, int offset);
}
